Skip to content

Conversation

@LevKats
Copy link

@LevKats LevKats commented Nov 4, 2025

Add new ci workflow running all files changed in the PR commits multiple
times in parallel by default. Can be disabled by setting the noflaky
PR label.

Co-authored-by: Nikita Zheleztsov [email protected]

Fixes #531

NO_DOC=ci
NO_TEST=ci

@LevKats LevKats self-assigned this Nov 4, 2025
@LevKats LevKats added the full-ci label Nov 4, 2025
@LevKats LevKats force-pushed the bump-test-run branch 4 times, most recently from c51d15a to 353cfab Compare November 4, 2025 20:38
Bump test-run so we can use the `--repeat` flag.

Part of tarantool#531

NO_DOC=bump
NO_TEST=bump
Add new ci workflow running all files changed in the PR commits multiple
times in parallel by default. Can be disabled by setting the noflaky
PR label.

Co-authored-by: Nikita Zheleztsov <[email protected]>

Fixes tarantool#531

NO_DOC=ci
NO_TEST=ci
Part of tarantool#531

NO_DOC=trivial
NO_TEST=trivial
@LevKats LevKats changed the title test: bump test-run to aaba736 ci: add flaky test catching workflow Nov 12, 2025
@LevKats LevKats added the do not merge Not ready to be merged label Nov 12, 2025
@LevKats LevKats marked this pull request as ready for review November 12, 2025 07:25
@LevKats LevKats requested a review from Serpentian November 12, 2025 07:39
Part of tarantool#531

NO_DOC=trivial
NO_TEST=trivial
Copy link
Collaborator

@Serpentian Serpentian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you a lot!

COMMAND git diff --relative=test/ --name-only
$$\{RANGE:-master..HEAD\}
-- "./*/*test.lua" |
xargs -L 128 -r ${PROJECT_SOURCE_DIR}/test/test-run.py -j -1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test-run runs for me in 1 thread, the same happens on CI, the chance of catching the flakiness, when executing the tests in one thread, is near 0. The following fixes that:

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 00ab983..7da69d4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -13,7 +13,7 @@ add_custom_target(test-flaky
     COMMAND git diff --relative=test/ --name-only
         $$\{RANGE:-master..HEAD\}
         -- "./*/*test.lua" |
-        xargs -L 128 -r ${PROJECT_SOURCE_DIR}/test/test-run.py -j -1
+        xargs -L 128 -r ${PROJECT_SOURCE_DIR}/test/test-run.py
         --force --retries=0
         --repeat=$$\{N_TRIALS:-32\}
         --builddir=${PROJECT_BINARY_DIR}

The help from test-run:

  -j [JOBS], --jobs [JOBS]
                        Workers count.
                        0 means 2 x CPU count.
                        -1 means everything running consistently (single process).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other workflows use test-force, which run the tests in the single process, but there, I suppose, the idea was to minimize flakiness, and I'd rather leave them as is. But the idea of the new workflow to maximize the flakiness and it's done by running the tests in all threads

!contains(github.event.pull_request.labels.*.name, 'notest')

env:
TNT_RELEASE_PATH: /home/runner/tnt-release
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, you don't cache the tarantool)

on:
pull_request:
paths:
- 'test/*/*.lua'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should end with _test.lua or .test.lua, not just lua. Otherwise, when changing e.g. luatest_helpers and not changing any tests, all of them will be started. Or am I missing smth?

catch_flaky:
if: github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'noflaky') &&
!contains(github.event.pull_request.labels.*.name, 'notest')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have notest at all. I would understand if other workflows paid attention to it, but they don't, so noflaky is enough

tt version
- name: Setup luatest
run: tt rocks install luatest 1.2.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we install some specific luatest version and not the latest? The same comment in another workflow

- name: Install tarantool
uses: tarantool/setup-tarantool@v3
with:
tarantool-version: '3.5'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider using master here. Yeah, it's much slower, but then we won't have to bump the version every several months here.

@Serpentian Serpentian removed their assignment Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Not ready to be merged full-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce workflow for checking the test flakiness

2 participants